// node 后端服务器

const loginApi = require('./api/loginInfo');
const studentApi = require('./api/studentInfo');
const violationApi = require('./api/violation');
const dormDetailApi = require('./api/dormDetail');
const perInfoApi = require('./api/perInfo');
const excelApi = require('./api/excel')
const dataSummaryApi = require('./api/dataSummary')


const fs = require('fs');
const path = require('path');
const bodyParser = require('body-parser');
const express = require('express');
const app = express();

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));

// 后端api路由
app.use('/api/loginInfo', loginApi)
app.use('/api/studentInfo', studentApi)
app.use('/api/violation', violationApi)
app.use('/api/dormDetail', dormDetailApi)
app.use('/api/perInfo', perInfoApi)
app.use('/api/excel', excelApi)
app.use('/api/dataSummary', dataSummaryApi)






// 监听端口
app.listen(3003);
console.log('success listen at port:3003......');